package com.sky.demo.entity;

import java.util.List;

import org.realogic.cfm.domain.KEntity;

/**
 * 业务单据-实体对象
 */
public class EntityBill implements KEntity {

	private static final long serialVersionUID = 2298661499354565470L;
	// 单据ID
	private Long id;
	// 单据编码
	private String code;
	// 交易类型
	private Long entityTypeID;
	// 交易日期
	private java.sql.Date entityDate;
	// 仓库ID
	private Long warehouseID;
	// 仓库
	private String warehouseName;
	// 客户ID
	private Long customerID;
	// 客户名称
	private String customerName;
	// 业务员
	private String employee;
	// 制单部门
	private String deptName;
	// 制单人
	private String operator;
	// 备注
	private String remark;
	// 状态
	private int status;
	// 次序号
	private long sortvalue;
	// 创建者
	private String createdBy;
	// 创建日期
	private java.sql.Timestamp createdOn;
	// 创建者ID
	private Long createdID;
	// 修改者
	private String updatedBy;
	// 最近修改日期
	private java.sql.Timestamp updatedOn;
	// 修改者ID
	private Long updatedID;
	// 审核者
	private String approvedBy;
	// 审核时间
	private java.sql.Timestamp approvedOn;
	// 审核者ID
	private Long approvedID;

	/******************* 关联对象 *******************/
	// 交易类型
	private EntityType type;
	// 仓库
	private EntityWarehouse warehouse;
	// 客户
	private EntityCustomer customer;
	private List<EntityItem> items;

	public EntityBill() {

	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long aId) {
		this.id = aId;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String aCode) {
		this.code = aCode;
	}

	public Long getEntityTypeID() {
		return this.entityTypeID;
	}

	public void setEntityTypeID(Long aEntityTypeID) {
		this.entityTypeID = aEntityTypeID;
	}

	public java.sql.Date getEntityDate() {
		return this.entityDate;
	}

	public void setEntityDate(java.sql.Date aEntityDate) {
		this.entityDate = aEntityDate;
	}

	public Long getWarehouseID() {
		return this.warehouseID;
	}

	public void setWarehouseID(Long aWarehouseID) {
		this.warehouseID = aWarehouseID;
	}

	public String getWarehouseName() {
		return this.warehouseName;
	}

	public void setWarehouseName(String aWarehouseName) {
		this.warehouseName = aWarehouseName;
	}

	public Long getCustomerID() {
		return this.customerID;
	}

	public void setCustomerID(Long aCustomerID) {
		this.customerID = aCustomerID;
	}

	public String getCustomerName() {
		return this.customerName;
	}

	public void setCustomerName(String aCustomerName) {
		this.customerName = aCustomerName;
	}

	public String getEmployee() {
		return this.employee;
	}

	public void setEmployee(String aEmployee) {
		this.employee = aEmployee;
	}

	public String getDeptName() {
		return this.deptName;
	}

	public void setDeptName(String aDeptName) {
		this.deptName = aDeptName;
	}

	public String getOperator() {
		return this.operator;
	}

	public void setOperator(String aOperator) {
		this.operator = aOperator;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String aRemark) {
		this.remark = aRemark;
	}

	public int getStatus() {
		return this.status;
	}

	public void setStatus(int aStatus) {
		this.status = aStatus;
	}

	public long getSortvalue() {
		return this.sortvalue;
	}

	public void setSortvalue(long aSortvalue) {
		this.sortvalue = aSortvalue;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String aCreatedBy) {
		this.createdBy = aCreatedBy;
	}

	public java.sql.Timestamp getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(java.sql.Timestamp aCreatedOn) {
		this.createdOn = aCreatedOn;
	}

	public Long getCreatedID() {
		return this.createdID;
	}

	public void setCreatedID(Long aCreatedID) {
		this.createdID = aCreatedID;
	}

	public String getUpdatedBy() {
		return this.updatedBy;
	}

	public void setUpdatedBy(String aUpdatedBy) {
		this.updatedBy = aUpdatedBy;
	}

	public java.sql.Timestamp getUpdatedOn() {
		return this.updatedOn;
	}

	public void setUpdatedOn(java.sql.Timestamp aUpdatedOn) {
		this.updatedOn = aUpdatedOn;
	}

	public Long getUpdatedID() {
		return this.updatedID;
	}

	public void setUpdatedID(Long aUpdatedID) {
		this.updatedID = aUpdatedID;
	}

	public String getApprovedBy() {
		return this.approvedBy;
	}

	public void setApprovedBy(String aApprovedBy) {
		this.approvedBy = aApprovedBy;
	}

	public java.sql.Timestamp getApprovedOn() {
		return this.approvedOn;
	}

	public void setApprovedOn(java.sql.Timestamp aApprovedOn) {
		this.approvedOn = aApprovedOn;
	}

	public Long getApprovedID() {
		return this.approvedID;
	}

	public void setApprovedID(Long aApprovedID) {
		this.approvedID = aApprovedID;
	}

	public void setItems(List<EntityItem> theList) {
		this.items = theList;
	}

	public List<EntityItem> getItems() {
		return items;
	}

	public void setType(EntityType theType) {
		this.type = theType;
	}

	public EntityType getType() {
		return type;
	}

	public void setWarehouse(EntityWarehouse theWarehouse) {
		this.warehouse = theWarehouse;
	}

	public EntityWarehouse getWarehouse() {
		return warehouse;
	}

	public void setCustomer(EntityCustomer theCustomer) {
		this.customer = theCustomer;
	}

	public EntityCustomer getCustomer() {
		return customer;
	}

	public String toString() {
		StringBuffer returnString = new StringBuffer();
		returnString.append("com.sky.demo.entity.EntityBill[");
		returnString.append("id = " + this.id + ";\n");
		returnString.append("code = " + this.code + ";\n");
		returnString.append("entityTypeID = " + this.entityTypeID + ";\n");
		returnString.append("entityDate = " + this.entityDate + ";\n");
		returnString.append("warehouseID = " + this.warehouseID + ";\n");
		returnString.append("warehouseName = " + this.warehouseName + ";\n");
		returnString.append("customerID = " + this.customerID + ";\n");
		returnString.append("customerName = " + this.customerName + ";\n");
		returnString.append("employee = " + this.employee + ";\n");
		returnString.append("deptName = " + this.deptName + ";\n");
		returnString.append("operator = " + this.operator + ";\n");
		returnString.append("remark = " + this.remark + ";\n");
		returnString.append("status = " + this.status + ";\n");
		returnString.append("sortvalue = " + this.sortvalue + ";\n");
		returnString.append("createdBy = " + this.createdBy + ";\n");
		returnString.append("createdOn = " + this.createdOn + ";\n");
		returnString.append("createdID = " + this.createdID + ";\n");
		returnString.append("updatedBy = " + this.updatedBy + ";\n");
		returnString.append("updatedOn = " + this.updatedOn + ";\n");
		returnString.append("updatedID = " + this.updatedID + ";\n");
		returnString.append("approvedBy = " + this.approvedBy + ";\n");
		returnString.append("approvedOn = " + this.approvedOn + ";\n");
		returnString.append("approvedID = " + this.approvedID + ";\n");
		returnString.append("]\n");
		return returnString.toString();
	}

	/******************* 辅助方法 *******************/
	/*
	 * 实体Key字符
	 */
	public String getKey() {
		if (id == null || id == 0) {
			return null;
		} else {
			return String.valueOf(id);
		}
	}
}